-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Go: Implement ClientId #3077
base: main
Are you sure you want to change the base?
Go: Implement ClientId #3077
Conversation
Signed-off-by: EdricCua <[email protected]>
Signed-off-by: EdricCua <[email protected]>
if err != nil { | ||
return createEmptyClusterValue[int64](), err | ||
} | ||
if opts.Route != nil && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove the nil
check here as the isMultiNode
function has default implementation in request_routing_config.go :-
type Route interface {
ToRoutesProtobuf() (*protobuf.Routes, error)
IsMultiNode() bool
}
type notMultiNode struct{}
func (*notMultiNode) IsMultiNode() bool { return false }
Can you check once this ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can a user call ClientIdWithOptions(nil)
? If yes, we can remove this nil check. If no, we need to adjust API of this command or RouteOption
to make route parameter optional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Yury-Fridlyand and @omangesg, I have to do opts.Route != nil to avoid error when doing the IsMultiNode() check.
func (route SimpleNodeRoute) IsMultiNode() bool {
return route != RandomRoute
}
if err != nil { | ||
return createEmptyClusterValue[int64](), err | ||
} | ||
if opts.Route != nil && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can a user call ClientIdWithOptions(nil)
? If yes, we can remove this nil check. If no, we need to adjust API of this command or RouteOption
to make route parameter optional.
Signed-off-by: EdricCua <[email protected]>
Signed-off-by: EdricCua <[email protected]>
Signed-off-by: EdricCua <[email protected]>
Signed-off-by: EdricCua <[email protected]>
Issue link
This Pull Request is linked to issue (URL): [REPLACE ME]
Checklist
Before submitting the PR make sure the following are checked: